home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 116
/
116.d81
/
secret identity
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
14KB
|
499 lines
5 dv=peek(186):ifdv<8thendv=8
10 goto8001
20 rem -- sir mix a lot --
30 qt=qt+1:ifqt>n%thenqt=1
32 rn%=rnd(1)*(n%-qt+1)+qt:a$=qt$(qt):b$=an$(qt)
35 qt$(qt)=qt$(rn%):an$(qt)=an$(rn%)
40 qt$(rn%)=a$:an$(rn%)=b$
45 return
46 rem -- print question --
50 print"[154]what@is@the@secret@identity@of..."
55 fori=1to6:ch$(i)="":next
60 cn%=(rnd(1)*6+1):ch$(cn%)=an$(qt)
65 fori=1to6:ifch$(i)<>""then90
70 rn%=rnd(1)*n%+1:ifan$(rn%)=an$(qt)then70
75 fl=0:forj=1toi:ifch$(j)=an$(rn%)thenfl=1:j=i
80 next:ifflthen70
85 ch$(i)=an$(rn%)
90 next
91 print"[154]"qt$(qt)"?"
92 poke214,2:print
94 fori=1to6:printtab(6)"[158]"ch$(i):next
96 print"[154]press@a@key@(1-6)@@press@(q)@to@quit"
98 return
100 rem -- game screen --
110 poke53280,0:poke53281,.:poke53283,2
115 poke53265,peek(53265)or64
120 print"[147]^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
130 print"[154]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
140 print"[154]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
150 print"______________________________________"
160 fori=1to6
170 print"^^^^^^^^^^^^^^^^^^^^^"
180 print"[153]"i"[157][157][157]@@[158]@@@@@@@@@@@@@@@@@@"
190 print"___[129]__________________"
200 next
210 print"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
220 print"[154]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
230 print"______________________________________"
240 poke214,4:print
250 fori=1to4
260 printtab(25)"^^^^^^^^^^^^^"
270 printtab(25)"[150]@@@@@@@@@@@@@"
280 printtab(25)"[150]@@@@@@@@@@@@@"
290 printtab(25)"_____________"
300 next
310 poke214,5:print
320 printtab(27)"[150]question#"
325 printtab(30)"000"
330 printtab(26)"point@value"
335 printtab(29)"00000"
340 printtab(29)"score"
345 printtab(29)"00000"
350 printtab(32-len(nm$)/2)""nm$
355 printtab(29)"00000[145]"
360 a$=str$(ts):printtab(35-len(a$))"[150]"right$(a$,len(a$)-1)
370 return
400 rem -- question number --
410 poke214,6:print
420 a$=str$(qn):printtab(34-len(a$))"[150]"right$(a$,len(a$)-1)
430 return
450 rem -- point value --
460 poke214,10:print
470 a$=str$(pv):printtab(35-len(a$))"[150]"right$(a$,len(a$)-1)
480 return
500 rem -- score --
510 poke214,14:print
520 a$=str$(sc):printtab(35-len(a$))"[150]"right$(a$,len(a$)-1)
530 return
600 rem -- erase --
610 print"[154]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
620 fori=1to6:printtab(6)"[158]@@@@@@@@@@@@@@@@":next
630 print"[154]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
640 return
650 rem -- quit --
660 poke214,22:print
665 print" @@@@@@do@you@want@to@quit?@(y/n)@@@@@@[145]"
670 geta$:ifa$="y"then15010
680 ifa$<>"n"then670
685 print" @press@a@key@(1-6)@@press@(q)@to@quit@"
690 goto2020
700 rem -- highlight correct answer --
710 poke214,cn%*3+2:print"[158]"
720 fori=1to2
730 printtab(6)"[145]"an$(qt):gosub1410:forde=1to250:next
740 printtab(6)"[145]"an$(qt):forde=1to200:next
750 next
760 printtab(6)"[145]"an$(qt):gosub1410:forde=1to800:next
770 return
775 :
780 poke214,cn%*3+2:print
785 printtab(6)"[145][158]"an$(qt):gosub1230
786 return
790 rem -- bonus prompt --
792 poke214,22:print
793 print"[154] @@bonus@if@you@answer@next@question!"
794 forde=1to1500:next
798 return
800 rem -- the questioner --
810 printtab(tb)"[192][193][194]";
820 printspc(36)"[195][196][154][197][198][199]";
830 printspc(34)"[200][201][202][203][204][205][206]";
840 printspc(33)"[207][208][209][210][211][212][213]";
850 printspc(32)"[214][215][216][217] [218][219][220][221]";
860 printspc(31)"[255][223][161][162] [163][164][165][166]";
870 printspc(31)"[167][168][169][170][171][172][173][174][175]";
880 printspc(31)"[176][177][178][179] [180][181][182][183]";
890 printspc(31)"[184][185][186][187] [188][189][190][191]";
900 printspc(31)"[192][193][194][195][196][197][198][199][200]";
910 printspc(32)"[201][202][160][160][160][203][204]"
920 return
950 rem -- right hook --
960 poke214,8:print""
970 printtab(21)" [205][206][207][146][204][205][206]"
980 printtab(21)"[208][209][210][211][146][211][212][213]"
990 printtab(20)" [212][213][214][146] [218][219][220][221]"
1000 printtab(20)" [215][216][146][162] [163][164][165][166]"
1010 printtab(20)" [217][146][169][170][171][172][173][174][175]"
1020 return
1050 rem -- left hook --
1060 poke214,8:print""
1070 printtab(21)"[200][201][202][218][219][220][160]"
1080 printtab(21)"[207][208][209][221][255][223][161]"
1090 printtab(20)"[214][215][216][217] [162][163][164][160]"
1100 printtab(20)"[255][223][161][162] [163][165][166][160]"
1110 printtab(20)"[167][168][169][170][171][172][173][167][160]"
1120 return
1200 rem -- clear sid chip --
1210 fori=.to24:pokes+i,.:next:return
1220 rem -- correct sound --
1230 pokes+24,15:pokes+6,225:pokes+4,17
1240 fori=1to7:forde=1to180step20
1250 pokes+1,de:next:next
1260 pokes+4,0:return
1300 rem -- wrong sound --
1310 pokes+24,15:pokes+5,129:pokes+6,129
1320 pokes+3,145:pokes+4,33:pokes+1,14
1330 forde=1to100:next
1340 fori=14to3step-1
1350 pokes+1,i:forde=.to18:next
1360 next:pokes+4,32
1370 return
1400 rem -- bell --
1410 pokes+2,.:pokes+3,8:pokes+5,.:pokes+6,252
1420 pokes+24,7:pokes,134:pokes+1,20
1430 pokes+4,65:forde=.to100:next
1440 pokes+4,64:return
1450 rem -- thwack --
1460 pokes+24,15:pokes+1,rnd(1)*20+10
1470 pokes+5,20:pokes+6,0:pokes+4,129
1480 forde=.to50:next:pokes+4,0
1490 return
1500 rem -- beep --
1510 pokes+1,50:pokes+6,240:pokes+24,15
1520 pokes+4,17:forde=1to300:next
1530 pokes+4,0:return
1600 rem -- a new high score! --
1610 fori=1to3:forj=1to3
1620 pokes+5,62:pokes+6,48
1630 pokes+1,j*3+6:pokes,54
1640 pokes+4,33:forde=1to108:next
1650 pokes+4,32::forde=1to10:next
1660 next:next:return
1900 rem --- check drive ---
1910 open15,dv,15,"r0:"+f$+"="+f$:input#15,er:close15
1920 return
2000 rem -- main --
2010 ifbg=3thengosub1510:gosub792
2015 gosub30:gosub410:gosub460:gosub510:gosub50
2020 geta$:ifa$<"1"ora$>"6"anda$<>"q"then2020
2025 ifa$="q"then660
2030 an=val(a$):ifch$(an)=an$(qt)then2110
2040 rem -- wrong answer --
2050 gosub1310:gosub710:pv=50:bg=0
2060 poke214,10:print:printtab(29)"[150]00050"
2070 goto2200
2100 rem -- correct answer --
2110 gosub780:sc=sc+pv:gosub510:pv=pv+50
2115 forde=1to1000:next
2120 bg=bg+1:ifbg=4thenbg=0:gosub4010
2200 qn=qn+1:ifqn>20then6010
2210 gosub610:goto2010
4000 rem -- bonus screen --
4010 poke53280,0:poke53281,0:print"[147]"
4020 poke53265,peek(53265)and191
4030 print" [160]oops![160]"
4040 c$="[156][150][129][158][159][153]"
4050 fori=1to7
4060 printmid$(c$,i,1)" [160][160][160][160][160][160][160]"
4070 print" [160]"bn$(i*3)"[160]"
4080 printmid$(c$,i,1)" [160][160][160][160][160][160][160]"
4090 next
4100 print" [155][160]start[160]\"
4110 printtab(16)"[158][160]the[160]bonus[160]game![160]"
4120 printtab(13)"^^^^^^^^^^^^^^^^^^^^^^^"
4130 printtab(13)"[154][160]"chr$(34)"press[160]down[160]spacebar"chr$(34)"[160]"
4140 printtab(13)"_______________________"
4150 poke214,18:print
4160 printtab(13)"^^^^^^^^^^^^^^^^^^^^^^^"
4170 printtab(13)"[154][160]"chr$(34)"release[160]when[160]ready!"chr$(34)"[160]"
4180 printtab(13)"_______________________"
4190 printtab(16)"[150][160][160]bonus[160]=[160]00000[160][160]"
4200 poke214,6:print:tb=23:gosub810
4210 bn=22:ifpeek(197)<>60then4210
4220 bn=bn-1:ifbn<0thenbn=0
4230 forde=1to70:next
4240 ifpeek(197)=60then4220
4250 fori=21tobnstep-1
4260 x=-(x=0):ifxthengosub1060:goto4280
4270 gosub960
4280 poke214,i:print:printtab(8)" [145][157]\"
4290 poke214,22:print"[150]"
4300 printtab(31-len(bn$(i)))bn$(i)
4310 gosub1460:poke214,6:print
4320 gosub810:forde=1to100:next
4330 next
4400 b$=bn$(i+1):bn=val(b$):ifbn=0thengosub1310:goto4420
4410 gosub1230
4420 forde=1to2000:next
4430 ifprthenreturn
4440 rem -- print bonus --
4445 gosub110:gosub410:gosub460:gosub510
4450 ifbn=0thenreturn
4460 poke214,10:print
4470 fori=1to3:printtab(13)"[159]@@@@@@@@@@@@@@":next
4480 printtab(14)"[145][145]bonus@=@"right$(b$,len(b$)-1):forde=1to500:next
4490 pokes+6,200:pokes+1,0:pokes+24,15
4500 fori=10tobnstep10:pokes+4,17:pokes+1,i/10:sc=sc+10:gosub510:pokes+4,0:next
4510 gosub1230:forde=1to500:next
4520 poke214,10:print
4530 printtab(13)"[158]@@@@@@@@@@ [150]@@"
4540 printtab(13)"[129]__________ __"
4550 printtab(13)"^^^^^^^^^^ ^^"
4560 return
6000 rem -- game over --
6010 poke53281,.:poke53